#include "RectangleShapeEmbryoEvaluator.h"

namespace GA {

/*
	RectangleShapeEmbryoEvaluator
*/

/*	public	*/

RectangleShapeEmbryoEvaluator::RectangleShapeEmbryoEvaluator(int gridWidth, int gridHeight, int width, int height) :
	ShapeEmbryoEvaluator(gridWidth, gridHeight) {

	/* rectangle origin */
	int rectangleOriginX = gridWidth  / 2 - width  / 2;
	int rectangleOriginY = gridHeight / 2 - height / 2;

	for(int i = 0; i != width; ++i) {
		for(int j = 0; j != height; ++j) {
			int x = rectangleOriginX + i;
			int y = rectangleOriginY + j;
			setShapePixel(x, y);
		}
	}
}

} // GA

